home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / MAKE3761.LZH / info / make.info-7 < prev    next >
Encoding:
GNU Info File  |  1998-07-20  |  46.6 KB  |  1,181 lines

  1. This is Info file make.info, produced by Makeinfo version 1.67 from the
  2. input file make.texinfo.
  3.  
  4. INFO-DIR-SECTION The GNU make utility
  5. START-INFO-DIR-ENTRY
  6. * GNU make: (make.info).           The GNU make utility.
  7. END-INFO-DIR-ENTRY
  8.  
  9.    This file documents the GNU Make utility, which determines
  10. automatically which pieces of a large program need to be recompiled,
  11. and issues the commands to recompile them.
  12.  
  13.    This is Edition 0.51, last updated 26 Aug 1997, of `The GNU Make
  14. Manual', for `make', Version 3.76 Beta.
  15.  
  16.    Copyright (C) 1988, '89, '90, '91, '92, '93, '94, '95, '96, '97     Free
  17. Software Foundation, Inc.
  18.  
  19.    Permission is granted to make and distribute verbatim copies of this
  20. manual provided the copyright notice and this permission notice are
  21. preserved on all copies.
  22.  
  23.    Permission is granted to copy and distribute modified versions of
  24. this manual under the conditions for verbatim copying, provided that
  25. the entire resulting derived work is distributed under the terms of a
  26. permission notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that this permission notice may be stated in a
  31. translation approved by the Free Software Foundation.
  32.  
  33. File: make.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
  34.  
  35. Variables for Specifying Commands
  36. =================================
  37.  
  38.    Makefiles should provide variables for overriding certain commands,
  39. options, and so on.
  40.  
  41.    In particular, you should run most utility programs via variables.
  42. Thus, if you use Bison, have a variable named `BISON' whose default
  43. value is set with `BISON = bison', and refer to it with `$(BISON)'
  44. whenever you need to use Bison.
  45.  
  46.    File management utilities such as `ln', `rm', `mv', and so on, need
  47. not be referred to through variables in this way, since users don't
  48. need to replace them with other programs.
  49.  
  50.    Each program-name variable should come with an options variable that
  51. is used to supply options to the program.  Append `FLAGS' to the
  52. program-name variable name to get the options variable name--for
  53. example, `BISONFLAGS'.  (The name `CFLAGS' is an exception to this
  54. rule, but we keep it because it is standard.)  Use `CPPFLAGS' in any
  55. compilation command that runs the preprocessor, and use `LDFLAGS' in
  56. any compilation command that does linking as well as in any direct use
  57. of `ld'.
  58.  
  59.    If there are C compiler options that *must* be used for proper
  60. compilation of certain files, do not include them in `CFLAGS'.  Users
  61. expect to be able to specify `CFLAGS' freely themselves.  Instead,
  62. arrange to pass the necessary options to the C compiler independently
  63. of `CFLAGS', by writing them explicitly in the compilation commands or
  64. by defining an implicit rule, like this:
  65.  
  66.      CFLAGS = -g
  67.      ALL_CFLAGS = -I. $(CFLAGS)
  68.      .c.o:
  69.              $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
  70.  
  71.    Do include the `-g' option in `CFLAGS', because that is not
  72. *required* for proper compilation.  You can consider it a default that
  73. is only recommended.  If the package is set up so that it is compiled
  74. with GCC by default, then you might as well include `-O' in the default
  75. value of `CFLAGS' as well.
  76.  
  77.    Put `CFLAGS' last in the compilation command, after other variables
  78. containing compiler options, so the user can use `CFLAGS' to override
  79. the others.
  80.  
  81.    `CFLAGS' should be used in every invocation of the C compiler, both
  82. those which do compilation and those which do linking.
  83.  
  84.    Every Makefile should define the variable `INSTALL', which is the
  85. basic command for installing a file into the system.
  86.  
  87.    Every Makefile should also define the variables `INSTALL_PROGRAM'
  88. and `INSTALL_DATA'.  (The default for each of these should be
  89. `$(INSTALL)'.)  Then it should use those variables as the commands for
  90. actual installation, for executables and nonexecutables respectively.
  91. Use these variables as follows:
  92.  
  93.      $(INSTALL_PROGRAM) foo $(bindir)/foo
  94.      $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
  95.  
  96. Always use a file name, not a directory name, as the second argument of
  97. the installation commands.  Use a separate command for each file to be
  98. installed.
  99.  
  100. File: make.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
  101.  
  102. Variables for Installation Directories
  103. ======================================
  104.  
  105.    Installation directories should always be named by variables, so it
  106. is easy to install in a nonstandard place.  The standard names for these
  107. variables are described below.  They are based on a standard filesystem
  108. layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
  109. other modern operating systems.
  110.  
  111.    These two variables set the root for the installation.  All the other
  112. installation directories should be subdirectories of one of these two,
  113. and nothing should be directly installed into these two directories.
  114.  
  115. `prefix'
  116.      A prefix used in constructing the default values of the variables
  117.      listed below.  The default value of `prefix' should be
  118.      `/usr/local'.  When building the complete GNU system, the prefix
  119.      will be empty and `/usr' will be a symbolic link to `/'.  (If you
  120.      are using Autoconf, write it as `@prefix@'.)
  121.  
  122. `exec_prefix'
  123.      A prefix used in constructing the default values of some of the
  124.      variables listed below.  The default value of `exec_prefix' should
  125.      be `$(prefix)'.  (If you are using Autoconf, write it as
  126.      `@exec_prefix@'.)
  127.  
  128.      Generally, `$(exec_prefix)' is used for directories that contain
  129.      machine-specific files (such as executables and subroutine
  130.      libraries), while `$(prefix)' is used directly for other
  131.      directories.
  132.  
  133.    Executable programs are installed in one of the following
  134. directories.
  135.  
  136. `bindir'
  137.      The directory for installing executable programs that users can
  138.      run.  This should normally be `/usr/local/bin', but write it as
  139.      `$(exec_prefix)/bin'.  (If you are using Autoconf, write it as
  140.      `@bindir@'.)
  141.  
  142. `sbindir'
  143.      The directory for installing executable programs that can be run
  144.      from the shell, but are only generally useful to system
  145.      administrators.  This should normally be `/usr/local/sbin', but
  146.      write it as `$(exec_prefix)/sbin'.  (If you are using Autoconf,
  147.      write it as `@sbindir@'.)
  148.  
  149. `libexecdir'
  150.      The directory for installing executable programs to be run by other
  151.      programs rather than by users.  This directory should normally be
  152.      `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'.
  153.      (If you are using Autoconf, write it as `@libexecdir@'.)
  154.  
  155.    Data files used by the program during its execution are divided into
  156. categories in two ways.
  157.  
  158.    * Some files are normally modified by programs; others are never
  159.      normally modified (though users may edit some of these).
  160.  
  161.    * Some files are architecture-independent and can be shared by all
  162.      machines at a site; some are architecture-dependent and can be
  163.      shared only by machines of the same kind and operating system;
  164.      others may never be shared between two machines.
  165.  
  166.    This makes for six different possibilities.  However, we want to
  167. discourage the use of architecture-dependent files, aside from object
  168. files and libraries.  It is much cleaner to make other data files
  169. architecture-independent, and it is generally not hard.
  170.  
  171.    Therefore, here are the variables Makefiles should use to specify
  172. directories:
  173.  
  174. `datadir'
  175.      The directory for installing read-only architecture independent
  176.      data files.  This should normally be `/usr/local/share', but write
  177.      it as `$(prefix)/share'.  (If you are using Autoconf, write it as
  178.      `@datadir@'.) As a special exception, see `$(infodir)' and
  179.      `$(includedir)' below.
  180.  
  181. `sysconfdir'
  182.      The directory for installing read-only data files that pertain to a
  183.      single machine-that is to say, files for configuring a host.
  184.      Mailer and network configuration files, `/etc/passwd', and so
  185.      forth belong here.  All the files in this directory should be
  186.      ordinary ASCII text files.  This directory should normally be
  187.      `/usr/local/etc', but write it as `$(prefix)/etc'.  (If you are
  188.      using Autoconf, write it as `@sysconfdir@'.)
  189.  
  190.      Do not install executables here in this directory (they probably
  191.      belong in `$(libexecdir)' or `$(sbindir)').  Also do not install
  192.      files that are modified in the normal course of their use (programs
  193.      whose purpose is to change the configuration of the system
  194.      excluded).  Those probably belong in `$(localstatedir)'.
  195.  
  196. `sharedstatedir'
  197.      The directory for installing architecture-independent data files
  198.      which the programs modify while they run.  This should normally be
  199.      `/usr/local/com', but write it as `$(prefix)/com'.  (If you are
  200.      using Autoconf, write it as `@sharedstatedir@'.)
  201.  
  202. `localstatedir'
  203.      The directory for installing data files which the programs modify
  204.      while they run, and that pertain to one specific machine.  Users
  205.      should never need to modify files in this directory to configure
  206.      the package's operation; put such configuration information in
  207.      separate files that go in `$(datadir)' or `$(sysconfdir)'.
  208.      `$(localstatedir)' should normally be `/usr/local/var', but write
  209.      it as `$(prefix)/var'.  (If you are using Autoconf, write it as
  210.      `@localstatedir@'.)
  211.  
  212. `libdir'
  213.      The directory for object files and libraries of object code.  Do
  214.      not install executables here, they probably ought to go in
  215.      `$(libexecdir)' instead.  The value of `libdir' should normally be
  216.      `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
  217.      are using Autoconf, write it as `@libdir@'.)
  218.  
  219. `infodir'
  220.      The directory for installing the Info files for this package.  By
  221.      default, it should be `/usr/local/info', but it should be written
  222.      as `$(prefix)/info'.  (If you are using Autoconf, write it as
  223.      `@infodir@'.)
  224.  
  225. `lispdir'
  226.      The directory for installing any Emacs Lisp files in this package.
  227.      By default, it should be `/usr/local/share/emacs/site-lisp', but
  228.      it should be written as `$(prefix)/share/emacs/site-lisp'.
  229.  
  230.      If you are using Autoconf, write the default as `@lispdir@'.  In
  231.      order to make `@lispdir@' work, you need the following lines in
  232.      your `configure.in' file:
  233.  
  234.           lispdir='${datadir}/emacs/site-lisp'
  235.           AC_SUBST(lispdir)
  236.  
  237. `includedir'
  238.      The directory for installing header files to be included by user
  239.      programs with the C `#include' preprocessor directive.  This
  240.      should normally be `/usr/local/include', but write it as
  241.      `$(prefix)/include'.  (If you are using Autoconf, write it as
  242.      `@includedir@'.)
  243.  
  244.      Most compilers other than GCC do not look for header files in
  245.      directory `/usr/local/include'.  So installing the header files
  246.      this way is only useful with GCC.  Sometimes this is not a problem
  247.      because some libraries are only really intended to work with GCC.
  248.      But some libraries are intended to work with other compilers.
  249.      They should install their header files in two places, one
  250.      specified by `includedir' and one specified by `oldincludedir'.
  251.  
  252. `oldincludedir'
  253.      The directory for installing `#include' header files for use with
  254.      compilers other than GCC.  This should normally be `/usr/include'.
  255.      (If you are using Autoconf, you can write it as `@oldincludedir@'.)
  256.  
  257.      The Makefile commands should check whether the value of
  258.      `oldincludedir' is empty.  If it is, they should not try to use
  259.      it; they should cancel the second installation of the header files.
  260.  
  261.      A package should not replace an existing header in this directory
  262.      unless the header came from the same package.  Thus, if your Foo
  263.      package provides a header file `foo.h', then it should install the
  264.      header file in the `oldincludedir' directory if either (1) there
  265.      is no `foo.h' there or (2) the `foo.h' that exists came from the
  266.      Foo package.
  267.  
  268.      To tell whether `foo.h' came from the Foo package, put a magic
  269.      string in the file--part of a comment--and `grep' for that string.
  270.  
  271.    Unix-style man pages are installed in one of the following:
  272.  
  273. `mandir'
  274.      The top-level directory for installing the man pages (if any) for
  275.      this package.  It will normally be `/usr/local/man', but you should
  276.      write it as `$(prefix)/man'.  (If you are using Autoconf, write it
  277.      as `@mandir@'.)
  278.  
  279. `man1dir'
  280.      The directory for installing section 1 man pages.  Write it as
  281.      `$(mandir)/man1'.
  282.  
  283. `man2dir'
  284.      The directory for installing section 2 man pages.  Write it as
  285.      `$(mandir)/man2'
  286.  
  287. `...'
  288.      *Don't make the primary documentation for any GNU software be a
  289.      man page.  Write a manual in Texinfo instead.  Man pages are just
  290.      for the sake of people running GNU software on Unix, which is a
  291.      secondary application only.*
  292.  
  293. `manext'
  294.      The file name extension for the installed man page.  This should
  295.      contain a period followed by the appropriate digit; it should
  296.      normally be `.1'.
  297.  
  298. `man1ext'
  299.      The file name extension for installed section 1 man pages.
  300.  
  301. `man2ext'
  302.      The file name extension for installed section 2 man pages.
  303.  
  304. `...'
  305.      Use these names instead of `manext' if the package needs to
  306.      install man pages in more than one section of the manual.
  307.  
  308.    And finally, you should set the following variable:
  309.  
  310. `srcdir'
  311.      The directory for the sources being compiled.  The value of this
  312.      variable is normally inserted by the `configure' shell script.
  313.      (If you are using Autconf, use `srcdir = @srcdir@'.)
  314.  
  315.    For example:
  316.  
  317.      # Common prefix for installation directories.
  318.      # NOTE: This directory must exist when you start the install.
  319.      prefix = /usr/local
  320.      exec_prefix = $(prefix)
  321.      # Where to put the executable for the command `gcc'.
  322.      bindir = $(exec_prefix)/bin
  323.      # Where to put the directories used by the compiler.
  324.      libexecdir = $(exec_prefix)/libexec
  325.      # Where to put the Info files.
  326.      infodir = $(prefix)/info
  327.  
  328.    If your program installs a large number of files into one of the
  329. standard user-specified directories, it might be useful to group them
  330. into a subdirectory particular to that program.  If you do this, you
  331. should write the `install' rule to create these subdirectories.
  332.  
  333.    Do not expect the user to include the subdirectory name in the value
  334. of any of the variables listed above.  The idea of having a uniform set
  335. of variable names for installation directories is to enable the user to
  336. specify the exact same values for several different GNU packages.  In
  337. order for this to be useful, all the packages must be designed so that
  338. they will work sensibly when the user does so.
  339.  
  340. File: make.info,  Node: Standard Targets,  Next: Install Command Categories,  Prev: Directory Variables,  Up: Makefile Conventions
  341.  
  342. Standard Targets for Users
  343. ==========================
  344.  
  345.    All GNU programs should have the following targets in their
  346. Makefiles:
  347.  
  348. `all'
  349.      Compile the entire program.  This should be the default target.
  350.      This target need not rebuild any documentation files; Info files
  351.      should normally be included in the distribution, and DVI files
  352.      should be made only when explicitly asked for.
  353.  
  354.      By default, the Make rules should compile and link with `-g', so
  355.      that executable programs have debugging symbols.  Users who don't
  356.      mind being helpless can strip the executables later if they wish.
  357.  
  358. `install'
  359.      Compile the program and copy the executables, libraries, and so on
  360.      to the file names where they should reside for actual use.  If
  361.      there is a simple test to verify that a program is properly
  362.      installed, this target should run that test.
  363.  
  364.      Do not strip executables when installing them.  Devil-may-care
  365.      users can use the `install-strip' target to do that.
  366.  
  367.      If possible, write the `install' target rule so that it does not
  368.      modify anything in the directory where the program was built,
  369.      provided `make all' has just been done.  This is convenient for
  370.      building the program under one user name and installing it under
  371.      another.
  372.  
  373.      The commands should create all the directories in which files are
  374.      to be installed, if they don't already exist.  This includes the
  375.      directories specified as the values of the variables `prefix' and
  376.      `exec_prefix', as well as all subdirectories that are needed.  One
  377.      way to do this is by means of an `installdirs' target as described
  378.      below.
  379.  
  380.      Use `-' before any command for installing a man page, so that
  381.      `make' will ignore any errors.  This is in case there are systems
  382.      that don't have the Unix man page documentation system installed.
  383.  
  384.      The way to install Info files is to copy them into `$(infodir)'
  385.      with `$(INSTALL_DATA)' (*note Command Variables::.), and then run
  386.      the `install-info' program if it is present.  `install-info' is a
  387.      program that edits the Info `dir' file to add or update the menu
  388.      entry for the given Info file; it is part of the Texinfo package.
  389.      Here is a sample rule to install an Info file:
  390.  
  391.           $(infodir)/foo.info: foo.info
  392.                   $(POST_INSTALL)
  393.           # There may be a newer info file in . than in srcdir.
  394.                   -if test -f foo.info; then d=.; \
  395.                    else d=$(srcdir); fi; \
  396.                   $(INSTALL_DATA) $$d/foo.info $@; \
  397.           # Run install-info only if it exists.
  398.           # Use `if' instead of just prepending `-' to the
  399.           # line so we notice real errors from install-info.
  400.           # We use `$(SHELL) -c' because some shells do not
  401.           # fail gracefully when there is an unknown command.
  402.                   if $(SHELL) -c 'install-info --version' \
  403.                      >/dev/null 2>&1; then \
  404.                     install-info --dir-file=$(infodir)/dir \
  405.                                  $(infodir)/foo.info; \
  406.                   else true; fi
  407.  
  408.      When writing the `install' target, you must classify all the
  409.      commands into three categories: normal ones, "pre-installation"
  410.      commands and "post-installation" commands.  *Note Install Command
  411.      Categories::.
  412.  
  413. `uninstall'
  414.      Delete all the installed files--the copies that the `install'
  415.      target creates.
  416.  
  417.      This rule should not modify the directories where compilation is
  418.      done, only the directories where files are installed.
  419.  
  420.      The uninstallation commands are divided into three categories,
  421.      just like the installation commands.  *Note Install Command
  422.      Categories::.
  423.  
  424. `install-strip'
  425.      Like `install', but strip the executable files while installing
  426.      them.  In many cases, the definition of this target can be very
  427.      simple:
  428.  
  429.           install-strip:
  430.                   $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
  431.                           install
  432.  
  433.      Normally we do not recommend stripping an executable unless you
  434.      are sure the program has no bugs.  However, it can be reasonable
  435.      to install a stripped executable for actual execution while saving
  436.      the unstripped executable elsewhere in case there is a bug.
  437.  
  438. `clean'
  439.      Delete all files from the current directory that are normally
  440.      created by building the program.  Don't delete the files that
  441.      record the configuration.  Also preserve files that could be made
  442.      by building, but normally aren't because the distribution comes
  443.      with them.
  444.  
  445.      Delete `.dvi' files here if they are not part of the distribution.
  446.  
  447. `distclean'
  448.      Delete all files from the current directory that are created by
  449.      configuring or building the program.  If you have unpacked the
  450.      source and built the program without creating any other files,
  451.      `make distclean' should leave only the files that were in the
  452.      distribution.
  453.  
  454. `mostlyclean'
  455.      Like `clean', but may refrain from deleting a few files that people
  456.      normally don't want to recompile.  For example, the `mostlyclean'
  457.      target for GCC does not delete `libgcc.a', because recompiling it
  458.      is rarely necessary and takes a lot of time.
  459.  
  460. `maintainer-clean'
  461.      Delete almost everything from the current directory that can be
  462.      reconstructed with this Makefile.  This typically includes
  463.      everything deleted by `distclean', plus more: C source files
  464.      produced by Bison, tags tables, Info files, and so on.
  465.  
  466.      The reason we say "almost everything" is that running the command
  467.      `make maintainer-clean' should not delete `configure' even if
  468.      `configure' can be remade using a rule in the Makefile.  More
  469.      generally, `make maintainer-clean' should not delete anything that
  470.      needs to exist in order to run `configure' and then begin to build
  471.      the program.  This is the only exception; `maintainer-clean' should
  472.      delete everything else that can be rebuilt.
  473.  
  474.      The `maintainer-clean' target is intended to be used by a
  475.      maintainer of the package, not by ordinary users.  You may need
  476.      special tools to reconstruct some of the files that `make
  477.      maintainer-clean' deletes.  Since these files are normally
  478.      included in the distribution, we don't take care to make them easy
  479.      to reconstruct.  If you find you need to unpack the full
  480.      distribution again, don't blame us.
  481.  
  482.      To help make users aware of this, the commands for the special
  483.      `maintainer-clean' target should start with these two:
  484.  
  485.           @echo 'This command is intended for maintainers to use; it'
  486.           @echo 'deletes files that may need special tools to rebuild.'
  487.  
  488. `TAGS'
  489.      Update a tags table for this program.
  490.  
  491. `info'
  492.      Generate any Info files needed.  The best way to write the rules
  493.      is as follows:
  494.  
  495.           info: foo.info
  496.           
  497.           foo.info: foo.texi chap1.texi chap2.texi
  498.                   $(MAKEINFO) $(srcdir)/foo.texi
  499.  
  500.      You must define the variable `MAKEINFO' in the Makefile.  It should
  501.      run the `makeinfo' program, which is part of the Texinfo
  502.      distribution.
  503.  
  504.      Normally a GNU distribution comes with Info files, and that means
  505.      the Info files are present in the source directory.  Therefore,
  506.      the Make rule for an info file should update it in the source
  507.      directory.  When users build the package, ordinarily Make will not
  508.      update the Info files because they will already be up to date.
  509.  
  510. `dvi'
  511.      Generate DVI files for all Texinfo documentation.  For example:
  512.  
  513.           dvi: foo.dvi
  514.           
  515.           foo.dvi: foo.texi chap1.texi chap2.texi
  516.                   $(TEXI2DVI) $(srcdir)/foo.texi
  517.  
  518.      You must define the variable `TEXI2DVI' in the Makefile.  It should
  519.      run the program `texi2dvi', which is part of the Texinfo
  520.      distribution.(1)  Alternatively, write just the dependencies, and
  521.      allow GNU `make' to provide the command.
  522.  
  523. `dist'
  524.      Create a distribution tar file for this program.  The tar file
  525.      should be set up so that the file names in the tar file start with
  526.      a subdirectory name which is the name of the package it is a
  527.      distribution for.  This name can include the version number.
  528.  
  529.      For example, the distribution tar file of GCC version 1.40 unpacks
  530.      into a subdirectory named `gcc-1.40'.
  531.  
  532.      The easiest way to do this is to create a subdirectory
  533.      appropriately named, use `ln' or `cp' to install the proper files
  534.      in it, and then `tar' that subdirectory.
  535.  
  536.      Compress the tar file file with `gzip'.  For example, the actual
  537.      distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'.
  538.  
  539.      The `dist' target should explicitly depend on all non-source files
  540.      that are in the distribution, to make sure they are up to date in
  541.      the distribution.  *Note Making Releases: (standards)Releases.
  542.  
  543. `check'
  544.      Perform self-tests (if any).  The user must build the program
  545.      before running the tests, but need not install the program; you
  546.      should write the self-tests so that they work when the program is
  547.      built but not installed.
  548.  
  549.    The following targets are suggested as conventional names, for
  550. programs in which they are useful.
  551.  
  552. `installcheck'
  553.      Perform installation tests (if any).  The user must build and
  554.      install the program before running the tests.  You should not
  555.      assume that `$(bindir)' is in the search path.
  556.  
  557. `installdirs'
  558.      It's useful to add a target named `installdirs' to create the
  559.      directories where files are installed, and their parent
  560.      directories.  There is a script called `mkinstalldirs' which is
  561.      convenient for this; you can find it in the Texinfo package.  You
  562.      can use a rule like this:
  563.  
  564.           # Make sure all installation directories (e.g. $(bindir))
  565.           # actually exist by making them if necessary.
  566.           installdirs: mkinstalldirs
  567.                   $(srcdir)/mkinstalldirs $(bindir) $(datadir) \
  568.                                           $(libdir) $(infodir) \
  569.                                           $(mandir)
  570.  
  571.      This rule should not modify the directories where compilation is
  572.      done.  It should do nothing but create installation directories.
  573.  
  574.    ---------- Footnotes ----------
  575.  
  576.    (1)  `texi2dvi' uses TeX to do the real work of formatting. TeX is
  577. not distributed with Texinfo.
  578.  
  579. File: make.info,  Node: Install Command Categories,  Prev: Standard Targets,  Up: Makefile Conventions
  580.  
  581. Install Command Categories
  582. ==========================
  583.  
  584.    When writing the `install' target, you must classify all the
  585. commands into three categories: normal ones, "pre-installation"
  586. commands and "post-installation" commands.
  587.  
  588.    Normal commands move files into their proper places, and set their
  589. modes.  They may not alter any files except the ones that come entirely
  590. from the package they belong to.
  591.  
  592.    Pre-installation and post-installation commands may alter other
  593. files; in particular, they can edit global configuration files or data
  594. bases.
  595.  
  596.    Pre-installation commands are typically executed before the normal
  597. commands, and post-installation commands are typically run after the
  598. normal commands.
  599.  
  600.    The most common use for a post-installation command is to run
  601. `install-info'.  This cannot be done with a normal command, since it
  602. alters a file (the Info directory) which does not come entirely and
  603. solely from the package being installed.  It is a post-installation
  604. command because it needs to be done after the normal command which
  605. installs the package's Info files.
  606.  
  607.    Most programs don't need any pre-installation commands, but we have
  608. the feature just in case it is needed.
  609.  
  610.    To classify the commands in the `install' rule into these three
  611. categories, insert "category lines" among them.  A category line
  612. specifies the category for the commands that follow.
  613.  
  614.    A category line consists of a tab and a reference to a special Make
  615. variable, plus an optional comment at the end.  There are three
  616. variables you can use, one for each category; the variable name
  617. specifies the category.  Category lines are no-ops in ordinary execution
  618. because these three Make variables are normally undefined (and you
  619. *should not* define them in the makefile).
  620.  
  621.    Here are the three possible category lines, each with a comment that
  622. explains what it means:
  623.  
  624.              $(PRE_INSTALL)     # Pre-install commands follow.
  625.              $(POST_INSTALL)    # Post-install commands follow.
  626.              $(NORMAL_INSTALL)  # Normal commands follow.
  627.  
  628.    If you don't use a category line at the beginning of the `install'
  629. rule, all the commands are classified as normal until the first category
  630. line.  If you don't use any category lines, all the commands are
  631. classified as normal.
  632.  
  633.    These are the category lines for `uninstall':
  634.  
  635.              $(PRE_UNINSTALL)     # Pre-uninstall commands follow.
  636.              $(POST_UNINSTALL)    # Post-uninstall commands follow.
  637.              $(NORMAL_UNINSTALL)  # Normal commands follow.
  638.  
  639.    Typically, a pre-uninstall command would be used for deleting entries
  640. from the Info directory.
  641.  
  642.    If the `install' or `uninstall' target has any dependencies which
  643. act as subroutines of installation, then you should start *each*
  644. dependency's commands with a category line, and start the main target's
  645. commands with a category line also.  This way, you can ensure that each
  646. command is placed in the right category regardless of which of the
  647. dependencies actually run.
  648.  
  649.    Pre-installation and post-installation commands should not run any
  650. programs except for these:
  651.  
  652.      [ basename bash cat chgrp chmod chown cmp cp dd diff echo
  653.      egrep expand expr false fgrep find getopt grep gunzip gzip
  654.      hostname install install-info kill ldconfig ln ls md5sum
  655.      mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee
  656.      test touch true uname xargs yes
  657.  
  658.    The reason for distinguishing the commands in this way is for the
  659. sake of making binary packages.  Typically a binary package contains
  660. all the executables and other files that need to be installed, and has
  661. its own method of installing them--so it does not need to run the normal
  662. installation commands.  But installing the binary package does need to
  663. execute the pre-installation and post-installation commands.
  664.  
  665.    Programs to build binary packages work by extracting the
  666. pre-installation and post-installation commands.  Here is one way of
  667. extracting the pre-installation commands:
  668.  
  669.      make -n install -o all \
  670.            PRE_INSTALL=pre-install \
  671.            POST_INSTALL=post-install \
  672.            NORMAL_INSTALL=normal-install \
  673.        | gawk -f pre-install.awk
  674.  
  675. where the file `pre-install.awk' could contain this:
  676.  
  677.      $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0}
  678.      on {print $0}
  679.      $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1}
  680.  
  681.    The resulting file of pre-installation commands is executed as a
  682. shell script as part of installing the binary package.
  683.  
  684. File: make.info,  Node: Quick Reference,  Next: Complex Makefile,  Prev: Makefile Conventions,  Up: Top
  685.  
  686. Quick Reference
  687. ***************
  688.  
  689.    This appendix summarizes the directives, text manipulation functions,
  690. and special variables which GNU `make' understands.  *Note Special
  691. Targets::, *Note Catalogue of Implicit Rules: Catalogue of Rules, and
  692. *Note Summary of Options: Options Summary, for other summaries.
  693.  
  694.    Here is a summary of the directives GNU `make' recognizes:
  695.  
  696. `define VARIABLE'
  697. `endef'
  698.      Define a multi-line, recursively-expanded variable.
  699.      *Note Sequences::.
  700.  
  701. `ifdef VARIABLE'
  702. `ifndef VARIABLE'
  703. `ifeq (A,B)'
  704. `ifeq "A" "B"'
  705. `ifeq 'A' 'B''
  706. `ifneq (A,B)'
  707. `ifneq "A" "B"'
  708. `ifneq 'A' 'B''
  709. `else'
  710. `endif'
  711.      Conditionally evaluate part of the makefile.
  712.      *Note Conditionals::.
  713.  
  714. `include FILE'
  715.      Include another makefile.
  716.      *Note Including Other Makefiles: Include.
  717.  
  718. `override VARIABLE = VALUE'
  719. `override VARIABLE := VALUE'
  720. `override VARIABLE += VALUE'
  721. `override define VARIABLE'
  722. `endef'
  723.      Define a variable, overriding any previous definition, even one
  724.      from the command line.
  725.      *Note The `override' Directive: Override Directive.
  726.  
  727. `export'
  728.      Tell `make' to export all variables to child processes by default.
  729.      *Note Communicating Variables to a Sub-`make': Variables/Recursion.
  730.  
  731. `export VARIABLE'
  732. `export VARIABLE = VALUE'
  733. `export VARIABLE := VALUE'
  734. `export VARIABLE += VALUE'
  735. `unexport VARIABLE'
  736.      Tell `make' whether or not to export a particular variable to child
  737.      processes.
  738.      *Note Communicating Variables to a Sub-`make': Variables/Recursion.
  739.  
  740. `vpath PATTERN PATH'
  741.      Specify a search path for files matching a `%' pattern.
  742.      *Note The `vpath' Directive: Selective Search.
  743.  
  744. `vpath PATTERN'
  745.      Remove all search paths previously specified for PATTERN.
  746.  
  747. `vpath'
  748.      Remove all search paths previously specified in any `vpath'
  749.      directive.
  750.  
  751.    Here is a summary of the text manipulation functions (*note
  752. Functions::.):
  753.  
  754. `$(subst FROM,TO,TEXT)'
  755.      Replace FROM with TO in TEXT.
  756.      *Note Functions for String Substitution and Analysis: Text
  757.      Functions.
  758.  
  759. `$(patsubst PATTERN,REPLACEMENT,TEXT)'
  760.      Replace words matching PATTERN with REPLACEMENT in TEXT.
  761.      *Note Functions for String Substitution and Analysis: Text
  762.      Functions.
  763.  
  764. `$(strip STRING)'
  765.      Remove excess whitespace characters from STRING.
  766.      *Note Functions for String Substitution and Analysis: Text
  767.      Functions.
  768.  
  769. `$(findstring FIND,TEXT)'
  770.      Locate FIND in TEXT.
  771.      *Note Functions for String Substitution and Analysis: Text
  772.      Functions.
  773.  
  774. `$(filter PATTERN...,TEXT)'
  775.      Select words in TEXT that match one of the PATTERN words.
  776.      *Note Functions for String Substitution and Analysis: Text
  777.      Functions.
  778.  
  779. `$(filter-out PATTERN...,TEXT)'
  780.      Select words in TEXT that *do not* match any of the PATTERN words.
  781.      *Note Functions for String Substitution and Analysis: Text
  782.      Functions.
  783.  
  784. `$(sort LIST)'
  785.      Sort the words in LIST lexicographically, removing duplicates.
  786.      *Note Functions for String Substitution and Analysis: Text
  787.      Functions.
  788.  
  789. `$(dir NAMES...)'
  790.      Extract the directory part of each file name.
  791.      *Note Functions for File Names: File Name Functions.
  792.  
  793. `$(notdir NAMES...)'
  794.      Extract the non-directory part of each file name.
  795.      *Note Functions for File Names: File Name Functions.
  796.  
  797. `$(suffix NAMES...)'
  798.      Extract the suffix (the last `.' and following characters) of each
  799.      file name.
  800.      *Note Functions for File Names: File Name Functions.
  801.  
  802. `$(basename NAMES...)'
  803.      Extract the base name (name without suffix) of each file name.
  804.      *Note Functions for File Names: File Name Functions.
  805.  
  806. `$(addsuffix SUFFIX,NAMES...)'
  807.      Append SUFFIX to each word in NAMES.
  808.      *Note Functions for File Names: File Name Functions.
  809.  
  810. `$(addprefix PREFIX,NAMES...)'
  811.      Prepend PREFIX to each word in NAMES.
  812.      *Note Functions for File Names: File Name Functions.
  813.  
  814. `$(join LIST1,LIST2)'
  815.      Join two parallel lists of words.
  816.      *Note Functions for File Names: File Name Functions.
  817.  
  818. `$(word N,TEXT)'
  819.      Extract the Nth word (one-origin) of TEXT.
  820.      *Note Functions for File Names: File Name Functions.
  821.  
  822. `$(words TEXT)'
  823.      Count the number of words in TEXT.
  824.      *Note Functions for File Names: File Name Functions.
  825.  
  826. `$(firstword NAMES...)'
  827.      Extract the first word of NAMES.
  828.      *Note Functions for File Names: File Name Functions.
  829.  
  830. `$(wildcard PATTERN...)'
  831.      Find file names matching a shell file name pattern (*not* a `%'
  832.      pattern).
  833.      *Note The Function `wildcard': Wildcard Function.
  834.  
  835. `$(shell COMMAND)'
  836.      Execute a shell command and return its output.
  837.      *Note The `shell' Function: Shell Function.
  838.  
  839. `$(origin VARIABLE)'
  840.      Return a string describing how the `make' variable VARIABLE was
  841.      defined.
  842.      *Note The `origin' Function: Origin Function.
  843.  
  844. `$(foreach VAR,WORDS,TEXT)'
  845.      Evaluate TEXT with VAR bound to each word in WORDS, and
  846.      concatenate the results.
  847.      *Note The `foreach' Function: Foreach Function.
  848.  
  849.    Here is a summary of the automatic variables.  *Note Automatic
  850. Variables: Automatic, for full information.
  851.  
  852. `$@'
  853.      The file name of the target.
  854.  
  855. `$%'
  856.      The target member name, when the target is an archive member.
  857.  
  858. `$<'
  859.      The name of the first dependency.
  860.  
  861. `$?'
  862.      The names of all the dependencies that are newer than the target,
  863.      with spaces between them.  For dependencies which are archive
  864.      members, only the member named is used (*note Archives::.).
  865.  
  866. `$^'
  867. `$+'
  868.      The names of all the dependencies, with spaces between them.  For
  869.      dependencies which are archive members, only the member named is
  870.      used (*note Archives::.).  The value of `$^' omits duplicate
  871.      dependencies, while `$+' retains them and preserves their order.
  872.  
  873. `$*'
  874.      The stem with which an implicit rule matches (*note How Patterns
  875.      Match: Pattern Match.).
  876.  
  877. `$(@D)'
  878. `$(@F)'
  879.      The directory part and the file-within-directory part of `$@'.
  880.  
  881. `$(*D)'
  882. `$(*F)'
  883.      The directory part and the file-within-directory part of `$*'.
  884.  
  885. `$(%D)'
  886. `$(%F)'
  887.      The directory part and the file-within-directory part of `$%'.
  888.  
  889. `$(<D)'
  890. `$(<F)'
  891.      The directory part and the file-within-directory part of `$<'.
  892.  
  893. `$(^D)'
  894. `$(^F)'
  895.      The directory part and the file-within-directory part of `$^'.
  896.  
  897. `$(+D)'
  898. `$(+F)'
  899.      The directory part and the file-within-directory part of `$+'.
  900.  
  901. `$(?D)'
  902. `$(?F)'
  903.      The directory part and the file-within-directory part of `$?'.
  904.  
  905.    These variables are used specially by GNU `make':
  906.  
  907. `MAKEFILES'
  908.      Makefiles to be read on every invocation of `make'.
  909.      *Note The Variable `MAKEFILES': MAKEFILES Variable.
  910.  
  911. `VPATH'
  912.      Directory search path for files not found in the current directory.
  913.      *Note `VPATH' Search Path for All Dependencies: General Search.
  914.  
  915. `SHELL'
  916.      The name of the system default command interpreter, usually
  917.      `/bin/sh'.  You can set `SHELL' in the makefile to change the
  918.      shell used to run commands.  *Note Command Execution: Execution.
  919.  
  920. `MAKESHELL'
  921.      On MS-DOS only, the name of the command interpreter that is to be
  922.      used by `make'. This value takes precedence over the value of
  923.      `SHELL'.  *Note MAKESHELL variable: Execution.
  924.  
  925. `MAKE'
  926.      The name with which `make' was invoked.  Using this variable in
  927.      commands has special meaning.  *Note How the `MAKE' Variable
  928.      Works: MAKE Variable.
  929.  
  930. `MAKELEVEL'
  931.      The number of levels of recursion (sub-`make's).
  932.      *Note Variables/Recursion::.
  933.  
  934. `MAKEFLAGS'
  935.      The flags given to `make'.  You can set this in the environment or
  936.      a makefile to set flags.
  937.      *Note Communicating Options to a Sub-`make': Options/Recursion.
  938.  
  939. `MAKECMDGOALS'
  940.      The targets given to `make' on the command line.  Setting this
  941.      variable has no effect on the operation of `make'.
  942.      *Note Arguments to Specify the Goals: Goals.
  943.  
  944. `SUFFIXES'
  945.      The default list of suffixes before `make' reads any makefiles.
  946.  
  947. File: make.info,  Node: Complex Makefile,  Next: Concept Index,  Prev: Quick Reference,  Up: Top
  948.  
  949. Complex Makefile Example
  950. ************************
  951.  
  952.    Here is the makefile for the GNU `tar' program.  This is a
  953. moderately complex makefile.
  954.  
  955.    Because it is the first target, the default goal is `all'.  An
  956. interesting feature of this makefile is that `testpad.h' is a source
  957. file automatically created by the `testpad' program, itself compiled
  958. from `testpad.c'.
  959.  
  960.    If you type `make' or `make all', then `make' creates the `tar'
  961. executable, the `rmt' daemon that provides remote tape access, and the
  962. `tar.info' Info file.
  963.  
  964.    If you type `make install', then `make' not only creates `tar',
  965. `rmt', and `tar.info', but also installs them.
  966.  
  967.    If you type `make clean', then `make' removes the `.o' files, and
  968. the `tar', `rmt', `testpad', `testpad.h', and `core' files.
  969.  
  970.    If you type `make distclean', then `make' not only removes the same
  971. files as does `make clean' but also the `TAGS', `Makefile', and
  972. `config.status' files.  (Although it is not evident, this makefile (and
  973. `config.status') is generated by the user with the `configure' program,
  974. which is provided in the `tar' distribution, but is not shown here.)
  975.  
  976.    If you type `make realclean', then `make' removes the same files as
  977. does `make distclean' and also removes the Info files generated from
  978. `tar.texinfo'.
  979.  
  980.    In addition, there are targets `shar' and `dist' that create
  981. distribution kits.
  982.  
  983.      # Generated automatically from Makefile.in by configure.
  984.      # Un*x Makefile for GNU tar program.
  985.      # Copyright (C) 1991 Free Software Foundation, Inc.
  986.      
  987.      # This program is free software; you can redistribute
  988.      # it and/or modify it under the terms of the GNU
  989.      # General Public License ...
  990.      ...
  991.      ...
  992.      
  993.      SHELL = /bin/sh
  994.      
  995.      #### Start of system configuration section. ####
  996.      
  997.      srcdir = .
  998.      
  999.      # If you use gcc, you should either run the
  1000.      # fixincludes script that comes with it or else use
  1001.      # gcc with the -traditional option.  Otherwise ioctl
  1002.      # calls will be compiled incorrectly on some systems.
  1003.      CC = gcc -O
  1004.      YACC = bison -y
  1005.      INSTALL = /usr/local/bin/install -c
  1006.      INSTALLDATA = /usr/local/bin/install -c -m 644
  1007.      
  1008.      # Things you might add to DEFS:
  1009.      # -DSTDC_HEADERS        If you have ANSI C headers and
  1010.      #                       libraries.
  1011.      # -DPOSIX               If you have POSIX.1 headers and
  1012.      #                       libraries.
  1013.      # -DBSD42               If you have sys/dir.h (unless
  1014.      #                       you use -DPOSIX), sys/file.h,
  1015.      #                       and st_blocks in `struct stat'.
  1016.      # -DUSG                 If you have System V/ANSI C
  1017.      #                       string and memory functions
  1018.      #                       and headers, sys/sysmacros.h,
  1019.      #                       fcntl.h, getcwd, no valloc,
  1020.      #                       and ndir.h (unless
  1021.      #                       you use -DDIRENT).
  1022.      # -DNO_MEMORY_H         If USG or STDC_HEADERS but do not
  1023.      #                       include memory.h.
  1024.      # -DDIRENT              If USG and you have dirent.h
  1025.      #                       instead of ndir.h.
  1026.      # -DSIGTYPE=int         If your signal handlers
  1027.      #                       return int, not void.
  1028.      # -DNO_MTIO             If you lack sys/mtio.h
  1029.      #                       (magtape ioctls).
  1030.      # -DNO_REMOTE           If you do not have a remote shell
  1031.      #                       or rexec.
  1032.      # -DUSE_REXEC           To use rexec for remote tape
  1033.      #                       operations instead of
  1034.      #                       forking rsh or remsh.
  1035.      # -DVPRINTF_MISSING     If you lack vprintf function
  1036.      #                       (but have _doprnt).
  1037.      # -DDOPRNT_MISSING      If you lack _doprnt function.
  1038.      #                       Also need to define
  1039.      #                       -DVPRINTF_MISSING.
  1040.      # -DFTIME_MISSING       If you lack ftime system call.
  1041.      # -DSTRSTR_MISSING      If you lack strstr function.
  1042.      # -DVALLOC_MISSING      If you lack valloc function.
  1043.      # -DMKDIR_MISSING       If you lack mkdir and
  1044.      #                       rmdir system calls.
  1045.      # -DRENAME_MISSING      If you lack rename system call.
  1046.      # -DFTRUNCATE_MISSING   If you lack ftruncate
  1047.      #                       system call.
  1048.      # -DV7                  On Version 7 Unix (not
  1049.      #                       tested in a long time).
  1050.      # -DEMUL_OPEN3          If you lack a 3-argument version
  1051.      #                       of open, and want to emulate it
  1052.      #                       with system calls you do have.
  1053.      # -DNO_OPEN3            If you lack the 3-argument open
  1054.      #                       and want to disable the tar -k
  1055.      #                       option instead of emulating open.
  1056.      # -DXENIX               If you have sys/inode.h
  1057.      #                       and need it 94 to be included.
  1058.      
  1059.      DEFS =  -DSIGTYPE=int -DDIRENT -DSTRSTR_MISSING \
  1060.              -DVPRINTF_MISSING -DBSD42
  1061.      # Set this to rtapelib.o unless you defined NO_REMOTE,
  1062.      # in which case make it empty.
  1063.      RTAPELIB = rtapelib.o
  1064.      LIBS =
  1065.      DEF_AR_FILE = /dev/rmt8
  1066.      DEFBLOCKING = 20
  1067.      
  1068.      CDEBUG = -g
  1069.      CFLAGS = $(CDEBUG) -I. -I$(srcdir) $(DEFS) \
  1070.              -DDEF_AR_FILE=\"$(DEF_AR_FILE)\" \
  1071.              -DDEFBLOCKING=$(DEFBLOCKING)
  1072.      LDFLAGS = -g
  1073.      
  1074.      prefix = /usr/local
  1075.      # Prefix for each installed program,
  1076.      # normally empty or `g'.
  1077.      binprefix =
  1078.      
  1079.      # The directory to install tar in.
  1080.      bindir = $(prefix)/bin
  1081.      
  1082.      # The directory to install the info files in.
  1083.      infodir = $(prefix)/info
  1084.      
  1085.      #### End of system configuration section. ####
  1086.      
  1087.      SRC1 =  tar.c create.c extract.c buffer.c \
  1088.              getoldopt.c update.c gnu.c mangle.c
  1089.      SRC2 =  version.c list.c names.c diffarch.c \
  1090.              port.c wildmat.c getopt.c
  1091.      SRC3 =  getopt1.c regex.c getdate.y
  1092.      SRCS =  $(SRC1) $(SRC2) $(SRC3)
  1093.      OBJ1 =  tar.o create.o extract.o buffer.o \
  1094.              getoldopt.o update.o gnu.o mangle.o
  1095.      OBJ2 =  version.o list.o names.o diffarch.o \
  1096.              port.o wildmat.o getopt.o
  1097.      OBJ3 =  getopt1.o regex.o getdate.o $(RTAPELIB)
  1098.      OBJS =  $(OBJ1) $(OBJ2) $(OBJ3)
  1099.      AUX =   README COPYING ChangeLog Makefile.in  \
  1100.              makefile.pc configure configure.in \
  1101.              tar.texinfo tar.info* texinfo.tex \
  1102.              tar.h port.h open3.h getopt.h regex.h \
  1103.              rmt.h rmt.c rtapelib.c alloca.c \
  1104.              msd_dir.h msd_dir.c tcexparg.c \
  1105.              level-0 level-1 backup-specs testpad.c
  1106.      
  1107.      all:    tar rmt tar.info
  1108.      
  1109.      tar:    $(OBJS)
  1110.              $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  1111.      
  1112.      rmt:    rmt.c
  1113.              $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rmt.c
  1114.      
  1115.      tar.info: tar.texinfo
  1116.              makeinfo tar.texinfo
  1117.      
  1118.      install: all
  1119.              $(INSTALL) tar $(bindir)/$(binprefix)tar
  1120.              -test ! -f rmt || $(INSTALL) rmt /etc/rmt
  1121.              $(INSTALLDATA) $(srcdir)/tar.info* $(infodir)
  1122.      
  1123.      $(OBJS): tar.h port.h testpad.h
  1124.      regex.o buffer.o tar.o: regex.h
  1125.      # getdate.y has 8 shift/reduce conflicts.
  1126.      
  1127.      testpad.h: testpad
  1128.              ./testpad
  1129.      
  1130.      testpad: testpad.o
  1131.              $(CC) -o $@ testpad.o
  1132.      
  1133.      TAGS:   $(SRCS)
  1134.              etags $(SRCS)
  1135.      
  1136.      clean:
  1137.              rm -f *.o tar rmt testpad testpad.h core
  1138.      
  1139.      distclean: clean
  1140.              rm -f TAGS Makefile config.status
  1141.      
  1142.      realclean: distclean
  1143.              rm -f tar.info*
  1144.      
  1145.      shar: $(SRCS) $(AUX)
  1146.              shar $(SRCS) $(AUX) | compress \
  1147.                > tar-`sed -e '/version_string/!d' \
  1148.                           -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  1149.                           -e q
  1150.                           version.c`.shar.Z
  1151.      
  1152.      dist: $(SRCS) $(AUX)
  1153.              echo tar-`sed \
  1154.                   -e '/version_string/!d' \
  1155.                   -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  1156.                   -e q
  1157.                   version.c` > .fname
  1158.              -rm -rf `cat .fname`
  1159.              mkdir `cat .fname`
  1160.              ln $(SRCS) $(AUX) `cat .fname`
  1161.              -rm -rf `cat .fname` .fname
  1162.              tar chZf `cat .fname`.tar.Z `cat .fname`
  1163.      
  1164.      tar.zoo: $(SRCS) $(AUX)
  1165.              -rm -rf tmp.dir
  1166.              -mkdir tmp.dir
  1167.              -rm tar.zoo
  1168.              for X in $(SRCS) $(AUX) ; do \
  1169.                  echo $$X ; \
  1170.                  sed 's/$$/^M/' $$X \
  1171.                  > tmp.dir/$$X ; done
  1172.              cd tmp.dir ; zoo aM ../tar.zoo *
  1173.              -rm -rf tmp.dir
  1174.  
  1175.